<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	
</script>
</head>
<body>
	<div>studentlist</div>
	<table>
		<tr>
			<td>id</td>
			<td>name</td>
			<td>age</td>
			<td>clazz</td>
			<td>teacher</td>
		</tr>
	
		<tr th:each="student:${students}">
			<td>[[${student.sid}]]</td>
			<td>[[${student.sname}]]</td>
			<td>[[${student.age}]]</td>
			<td  th:text="${student.clazz.cname}" th:if="${not #strings.isEmpty(student.clazz)}"></td>
			<td th:text="${teacher.tname}" th:each="teacher:${student.teachers}"  th:if="${not #strings.isEmpty(student.teachers)}"></td>
		</tr>
	</table>
</body>
</html>